import pytest
import requests
from send.Send import Send
from utils.read_yaml import read_yaml


class Test_register:

    @pytest.mark.parametrize( "args" ,  read_yaml("D:/Projects/接口自动化/data/register.yaml")  )
    def test_register(self,args):

        # name = args["param"]["username"]
        # pwd= args["param"]["pwd"]
        exp = args["exp"]

        session  = requests.session()

        se = Send()
        result = se.send_register(session,args)

        assert result["code"] == 200 and result["body"]["code"] == exp